package com.ssy.lingxi.contract.api.fallback;

import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.contract.api.feign.ContractControllerFeign;
import com.ssy.lingxi.contract.api.model.vo.request.ContrPriceQueryRequest;
import com.ssy.lingxi.contract.api.model.vo.request.ContractPageRequest;
import com.ssy.lingxi.contract.api.model.vo.request.PayApplyAmountVO;
import com.ssy.lingxi.contract.api.model.vo.request.PurchaseMaterielPriceRequestVO;
import com.ssy.lingxi.contract.api.model.vo.response.ContractPageResponse;
import com.ssy.lingxi.contract.api.model.vo.response.ContractPriceQueryVO;
import com.ssy.lingxi.contract.api.model.vo.response.PurchaseMaterielPriceVO;

import javax.validation.Valid;
import java.util.List;

/**
 * 合同内部接口降级实现
 * @author 伍将
 * @date 2021/3/19
 * @version 2.0.0
 */
public class ContractControllerFeignFallback implements ContractControllerFeign {

    @Override
    public Wrapper<List<PurchaseMaterielPriceVO>> getPurchaseMaterielPriceList(@Valid PurchaseMaterielPriceRequestVO requestVO) {
        return Wrapper.fail(ResponseCode.CONTRACT_SERVICE_ERROR);
    }

    @Override
    public Wrapper<Void> payApplyAmount(@Valid PayApplyAmountVO payVO) {
        return Wrapper.fail(ResponseCode.CONTRACT_SERVICE_ERROR);
    }

    @Override
    public Wrapper<PageData<ContractPageResponse>> pageContractByPartB(@Valid ContractPageRequest requestVO) {
        return Wrapper.fail(ResponseCode.CONTRACT_SERVICE_ERROR);
    }

    @Override
    public Wrapper<ContractPriceQueryVO> goodsPriceByGoods(@Valid ContrPriceQueryRequest request) {
        return Wrapper.fail(ResponseCode.CONTRACT_SERVICE_ERROR);
    }
}
